<?php
	require_once('inc.config.php');

	$order=$_GET["order"];
	$key = $_GET["key"];
	$page = $_GET["p"];

	//if(!isset($key)){//首页排序
		//$result = $myAgent->getAllList($type);
	//}else{ //内部排序
	if(!isset($key)){$key = "";}
	$result = $myAgent->getSearchList($key , $order , $page);
	//}
	
	//echo $result;
	echo json_encode($result);
?>